package cn.tedu_two;

import java.util.LinkedList;

public class Test3 {
    public static void main(String[] args) {
        LinkedList l=new LinkedList();
        l.addFirst(500);
        l.addLast(9800);
        System.out.println(l.getFirst());
        System.out.println(l.getLast());
        System.out.println(l.removeFirst());
        System.out.println(l.removeLast());

    }
}
